<template>
  <div :style="{backgroundColor:backColor,height:'37px',lineHeight:'37px'}">
    {{text}}

  </div>
</template>
<script>
export default {
  props: ['state', 'current', 'isNg'],
  data() {
    return {};
  },
  computed: {
    text() {
      if (this.state >= this.current) {
        return 'Yes';
      } else if (this.state + 1 == this.current) {
        if (this.isNg == 'Y') {
          return 'Ng';
        } else {
        }
      }
      return '';
    },
    backColor() {
      if (this.state + 1 == this.current) {
        if (this.isNg == 'Y') {
          return '#ff0000';
        } else if (this.current == 1) {
          return '#b2540e';
        } else if (this.current == 2) {
          return '#0070c0';
        } else if (this.current == 3) {
          return '#f4aa72';
        } else if (this.current == 4) {
          return '#ffff00';
        } else if (this.current == 5) {
          return '#00b0f0';
        } else if (this.current == 6) {
          return '#00b050';
        }
      }
      return '#00ff0000';
    },
  },
};
</script>

